package pkg.commands;
import pkg.Player;

@SuppressWarnings("serial")
public class PlayerMoveCmd extends PlayerCmd {
	
	private Player.Direction direction;
	private boolean stop;
	
	public PlayerMoveCmd(Player.Direction direction,int speed)
	{
		this.playerID = 999999;
		this.direction = direction;
	}
	
	protected void executeLocal()
	{
		if(!stop)
		{
		  data.move(direction);
		}
		else
	      data.stop();
	}
	
	
	public void setDirection(Player.Direction direction)
	{
		this.direction = direction;
	}
	
	public void setStop(boolean setStop)
	{
		stop = setStop;
	}
}
